package com.tanhua.model.vo;

import com.tanhua.model.domain.UserInfo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

/**
 * @Description: test
 * @Create by: JJ菜菜
 * @Date: 2021/12/11 14:12
 *
 *  喜欢你的用户
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserlikeVo {

    private String id;
    private String avatar;
    private String nickname;
    private String createDate;

    public static UserlikeVo init(UserInfo userInfo, String createDate){

        UserlikeVo userlikeVo = new UserlikeVo();
        if(userInfo != null){
            BeanUtils.copyProperties(userInfo, userlikeVo);
            userlikeVo.setCreateDate(createDate);
        }
        return userlikeVo;
    }

}
